package model;

import java.util.ArrayList;

public class MyImage {

	private ArrayList<MyShape> shapes = new ArrayList<MyShape>();
	
	public MyImage() {

	}
	
	public MyShape getShape(int i) {
		
		return shapes.get(i);
		
	}
	
	public int getNumberShapes() {
		
		return shapes.size();
		
	}
	
	public void addShape(MyShape shape) {

		shapes.add(shape.getDepth(), shape);
		
	}
	
	public void editShape(int pos, MyShape shape) {
		
		shapes.add(pos, shape);
		shapes.remove(pos+1);

	}
	
	public void reset() {
		
		shapes.clear();
		
	}
	
	public void displayShapes() {

		for(int i = 0; i < getNumberShapes();i++) {
			
			System.out.println(shapes.get(i));
			
		}
	
	}
	
}
